﻿<%@ Page Language="C#" EnableViewState="false" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="HtmlWeb.List" %>

<%@ Register Src="ctl/dh2.ascx" TagName="dh2" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>采集项目列表</title>
    <link href="style/style.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
<!--
.STYLE3 {
	color: #FFFFFF;
	font-weight: bold;
}
.ov td
{
    background-color:#CCC;
    }
-->
    </style>
</head>
<body style="background-color:#FFFFFF">
<form id="form1" runat="server">
    <div class="bg2">
<table cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" width="100%">
    <tr>
        <td align="center" bgcolor="#f1f1f1" colspan="2" height="30" nowrap="nowrap">
            <uc1:dh2 ID="Dh2_1" runat="server" />
        </td>
    </tr>
</table>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" id="td_0">
          <tr>
            <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
              <tr>
                <td height="30" bgcolor="#0050CD" width="150px"><span class="STYLE3">项目名称</span></td>
                <td bgcolor="#0050CD"><span class="STYLE3">网址</span></td>
                <td bgcolor="#0050CD" width="55px;"><span class="STYLE3">是否启用</span></td>
                <td bgcolor="#0050CD" width="250px;"><span class="STYLE3">管理操作</span></td>
                <td bgcolor="#0050CD" width="120px"><span class="STYLE3">最后采集时间</span></td>
              </tr>
                <asp:Repeater ID="Repeater1" runat="server">
                <ItemTemplate>
                <tr onmouseover="this.className='ov'" onmouseout="this.className=''">
                <td bgcolor="#EDF3FA"><%#Eval("p_Name")%></td>
                <td bgcolor="#EDF3FA"><a href='<%#Eval("p_WebUrl")%>' target="_blank" title='<%#Eval("p_Name")%>'><%#Eval("p_WebUrl")%></a></td>
                <td bgcolor="#EDF3FA" align=center><a href="javascript:ushow(<%#Eval("ID")%>,<%#Eval("p_Show")%>)"><img border="0" src="images/state<%#Eval("p_Show")%>.gif" /></a></td>
                <td bgcolor="#EDF3FA">
                <a href="Edit.aspx?ID=<%#Eval("ID")%>">编辑</a> | 
                <a  href="list.aspx?copyID=<%#Eval("ID")%>&muluid=<%=this.Context.Request.QueryString["muluid"] %>">复制</a> | 
                <a target="_blank"  href="test.aspx?ID=<%#Eval("ID")%>">演示</a> | <a  target="_blank" href="show.aspx?ID=<%#Eval("ID")%>">采集到数据库</a> | 
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:del(<%#Eval("ID")%>,<%=this.Context.Request.QueryString["muluid"] %>)"><img src="images/cancel.gif" alt="删除" /></a></td>
                 <td bgcolor="#EDF3FA" style="color:Red;"><%#rtime(Eval("p_Time"))%></td>
              </tr>
                </ItemTemplate>
                </asp:Repeater>              
            </table></td>
          </tr>
        </table>
    </div>
    <script type="text/javascript">
        function del(_id,_muuid) {
            var msg = window.confirm("您确定要删除吗?");
            if (msg) {
                window.location="list.aspx?delID="+_id+"&muluid="+_muuid;
            }
        }

        function ushow(_id, _show) {
            HtmlWeb.List.UpZT(_id, _show, function (res) {
                if (res && res.value == 1) {
                    window.location.reload();
                }
            });
        }
    </script>
</form>
</body>
</html>